/**
 * roles：页面级别权限，这里模拟二种 "admin"、"common"
 * admin：管理员角色
 * common：普通角色
 */

const menus = [
  {
    path: "/permission",
    meta: {
      title: "权限管理",
      icon: "ep:lollipop",
      rank: 10
    },
    children: [
      {
        path: "/permission/page/index",
        name: "PermissionPage",
        meta: {
          title: "页面权限",
          roles: ["admin", "common"]
        }
      },
      {
        path: "/permission/button/index",
        name: "PermissionButton",
        meta: {
          title: "按钮权限",
          roles: ["admin", "common"],
          auths: [
            "permission:btn:add",
            "permission:btn:edit",
            "permission:btn:delete"
          ]
        }
      }
    ]
  }
];

const result = {
  success: true,
  data: menus
};

const getMenuData = () => {
  return new Promise(resolve => {
    resolve(result);
  });
};

export default getMenuData;
